home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / util / libs / DigNet.lha / dignet / docs / DignetAREXX.doc < prev   
Encoding:
Text File  |  1997-08-23  |  6.5 KB  |  285 lines

  1.  
  2. DIGNET AREXX COMMANDS
  3. ---------------------
  4.  
  5.     From version 4.0 we have integrated an arexx host into the library.
  6.     You don't open the library as an arexx library since the library put
  7.     up a public port for you where you can direct commands, for example:
  8.  
  9.     address "DIGNET"
  10.  
  11.     AllocNet "serial.device" 0
  12.     Net=RESULT
  13.  
  14.     The arexx functions has the same names as their library function
  15.     fellows. This should make it easier to remember the commands.
  16.     However, some arexx commands has a different argument line due to
  17.     programming reasons. Please read on..
  18.  
  19.     For details on each function, please refer to the autodoc. This doc
  20.     only lists the arexx command names and their syntax.
  21.  
  22.     '"'net'"' is net number, not an address. This apply to all the arexx
  23.     commands. Be careful!
  24.  
  25.     Also note that many functions return the data result in RESULT so
  26.     you must use 'options results' at the beginning of your script.
  27.  
  28.  
  29.     ALSO: See arexx example in the arexx/ directory on how you can take
  30.     benefit of the arexx host.
  31.  
  32.  
  33. COMMANDS
  34. --------
  35.  
  36. AllocNet "device.name" [unit]
  37.  
  38.     Unit is optional. Note that the AllocNet arexx command does not
  39.     return the address to the net structure, but the net number in the
  40.     list.
  41.  
  42.     RESULT = net number or null if error
  43.     RC     = 0 if ok, 5 if error while allocating
  44.  
  45. FreeNet '"'net'"'
  46.  
  47.     RESULT = "0" if OK
  48.     RC     = 0 if OK, 5 (WARN) if net nout found
  49.  
  50.  
  51. ReadNet '"'net'"' '"'size'"'
  52.  
  53.     size   = how many bytes to read
  54.  
  55.     RESULT = buffer read (may contain binaries)
  56.     RC     = 0 is ok, 5 (WARN) is read error or net not found
  57.  
  58. WriteNet '"'net'"' '"'size'"' "data"
  59.  
  60.     size   = how many bytes to write to net
  61.     data   = the buffer to write. Try to make size equal or less
  62.          then data buffer length
  63.  
  64.     RESULT = 
  65.     RC     = 0 if ok, 5 (WARN) if write error or net not found
  66.  
  67. QueryNet '"'net'"'
  68.  
  69.     RESULT = how many bytes there are available for reading
  70.     RC     = 0 if ok, 5 (WARN) if net not found
  71.  
  72. AbortNet '"'net'"'
  73.  
  74.     RESULT =
  75.     RC     = 0 if ok, 5 (WARN) if error aborting net or net not found
  76.  
  77. Timeout '"'net'"' '"'seconds'"'
  78.  
  79.     seconds = number of seconds to wait before timeout
  80.  
  81.     RESULT = number of bytes available to be read
  82.     RC     = 0 if ok, 5 (WARN) if net not found
  83.  
  84. ReadString '"'net'"'
  85.  
  86.     RESULT = string just read
  87.     RC     = 0 if ok, 5 (WARN) if read error or net not found
  88.  
  89. WriteString '"'net'"' "string"
  90.  
  91.     string = string to write to net
  92.  
  93.     RESULT =
  94.     RC     = 0 if ok, 5 (WARN) if write error or net not found
  95.  
  96. GetNetport '"'net'"'
  97.  
  98.     RESULT = ptr. (translated to ascii) to the real device port
  99.     RC     = 0 if ok, 5 (WARN) if net not found
  100.  
  101.     Note that using this function is unusual and the result may
  102.     be wrong since the converter routine is based on word sizes.
  103.     Consider this command to be dangerous.
  104.  
  105. InitModem '"'net'"' "initstring"
  106.  
  107.     initstring = f.ex. "ATZ"||CR
  108.  
  109.     RESULT = modem return string (eg. "OK")
  110.     RC     = 0 if ok, 5 (WARN) if write error or net not found
  111.  
  112. CallModemDT
  113. CallModemDP '"'net'"' '"'number'"'
  114.  
  115.     number = phone number to call (ascii) eg. "01234567"
  116.  
  117.     RESULT = connect speed or null
  118.     RC     = 0 if ok, 5 (WARN) if write error or net not found
  119.  
  120. WaitModem '"'net'"'
  121.  
  122.     RESULT = connect string or null if aborted
  123.     RC     = 0 if ok, 5 (WARN) if net error or net not found
  124.  
  125.     NOTE: This function will not return until it get a modem call or
  126.     gets aborted with StopWaiting !
  127.  
  128. HangupModem '"'net'"'
  129.  
  130.     RESULT =
  131.     RC     = 0 if ok, 5 (WARN) if write error or net not found
  132.  
  133. StopWaiting '"'net'"'
  134.  
  135.     RESULT =
  136.     RC     =
  137.  
  138. FlushNet '"'net'"'
  139.  
  140.     RESULT =
  141.     RC     = 0 if ok, 5 (WARN) if net not found
  142.  
  143. SetBaud '"'net'"' '"'baud'"'
  144.  
  145.     baud   = set new baudrate speed (f.ex. 57600)
  146.  
  147.     RESULT =
  148.     RC     = 0 if ok, 5 (WARN) if net not found
  149.  
  150. ConvertModemString '"'string'"'
  151.  
  152.     RESULT = contains new converted string (may contain binaries)
  153.     RC     = 0 if ok, 5 (WARN) if net not found
  154.  
  155. GetIOmsg '"'net'"'
  156.  
  157.     RESULT = contain ascii value of address to IOmsg
  158.     RC     = 0 if ok, 5 (WARN) if net not found
  159.  
  160. GetModemStatus '"'net'"'
  161.  
  162.     RESULT = 0 if offline, 1 if online
  163.     RC     = 0 if ok, 5 (WARN) if net not found
  164.  
  165. GetCurrentDevice '"'net'"'
  166.  
  167.     RESULT = device name
  168.     RC     = 0 if ok, 5 (WARN) if net not found
  169.  
  170. GetCurrentUnit '"'net'"'
  171.  
  172.     RESULT = unit number
  173.     RC     = 0 if ok, 5 (WARN) if net not found
  174.  
  175. GetBaudrate '"'net'"'
  176.  
  177.     RESULT = current used baud rate
  178.     RC     = 0 if ok, 5 (WARN) if net not found
  179.  
  180. ParseConnect "connect string"
  181.  
  182.     RESULT = contain baud rate or error text
  183.     RC     = 0 if ok, 5 (WARN) if net not found
  184.  
  185. SetDefault '"'net'"'
  186.  
  187.     RESULT =
  188.     RC     = 0 if ok, 5 (WARN) if net not found
  189.  
  190. ConvertToPC "buffer/string"
  191.  
  192.     RESULT = contain new buffer (no need to free here)
  193.     RC     = 0 if ok, 5 (WARN) if error in text
  194.  
  195. ConvertToAmiga "buffer/string"
  196.  
  197.     RESULT = contain new buffer (no need to free here)
  198.     RC     = 0 if ok, 5 (WARN) if error in text
  199.  
  200. ObtainNet '"'net'"'
  201.  
  202.     RESULT = get ptr. to the net number '"'net'"' for shared usage
  203.          May be null.
  204.     RC     = 
  205.  
  206. WaitText '"'net'"' "waittext"
  207.  
  208.     waittext = text to wait for, f.ex "OK" or "CONNECT" etc.
  209.  
  210.     RESULT = 
  211.     RC     = 0 if ok, 5 (WARN) if IO error or net not found
  212.  
  213.     NOTE: this function will not return until it get the text it waits
  214.     for or StopWaiting is used.
  215.  
  216. ConverseText '"'net'"' "waittext" "sendtext"
  217.  
  218.     waittext = (see WaitText)
  219.     sendtxt  = when waittext is forfilled the function will send
  220.            this text to the modem.
  221.  
  222.     RESULT =
  223.     RC     = 0 if ok, 5 (WARN) if IO error or net not found
  224.  
  225.     NOTE: this function will not return until it get the text it waits
  226.     for or StopWaiting is used.
  227.  
  228. CaptureTextStart '"'net'"' "filename"
  229.  
  230.     filename = path and name on file to write captured IO to.
  231.  
  232.     RESULT =
  233.     RC     = 0 if ok, 5 (WARN) if file error or net not found
  234.  
  235. CaptureTextEnd '"'net'"'
  236.  
  237.     RESULT =
  238.     RC     = 0 if ok, 5 (WARN) if there was no capture active or net
  239.          was not found
  240.  
  241. *** THE FOLLOWING FUNCTIONS ARE CURRENTLY PRIVATE ***
  242.  
  243. SetParity '"'net'"' '"'mode'"'
  244.  
  245.     mode   = (see includes)
  246.  
  247.     RESULT =
  248.     RC     = 0 if ok, 5 (WARN) if net not found
  249.  
  250. SetHandshake '"'net'"' '"'mode'"'
  251.  
  252.     mode   = (see includes)
  253.  
  254.     RESULT =
  255.     RC     = 0 if ok, 5 (WARN) if net not found
  256.  
  257. SetStopbits '"'net'"' '"'numberofbits'"'
  258.  
  259.     numberofbits = number of stopbits, eg. 1
  260.  
  261.     RESULT =
  262.     RC     = 0 if ok, 5 (WARN) if net not found
  263.  
  264. SetBitwidth '"'net'"' '"'bitwidth'"'
  265.  
  266.     bitwidth = bitwidth per char, eg. 8 or 7
  267.  
  268.     RESULT =
  269.     RC     = 0 if ok, 5 (WARN) if net not found
  270.  
  271. [GetParity - not active in 4.0]
  272.  
  273. [GetHandshake - not active in 4.0]
  274.  
  275. GetStopbits '"'net'"'
  276.  
  277.     RESULT = contains number of stopbits (eg. 1 or 2)
  278.     RC     = 0 if ok, 5 (WARN) if net not found
  279.  
  280. GetBitwidth '"'net'"'
  281.  
  282.     RESULT = contains bitwidth of chars (eg. 7 or 8).
  283.     RC     = 0 if ok, 5 (WARN) if net not found
  284.  
  285.